const app = getApp()
//获得全局js变量
var util = require('../../utils/util.js');
Page({
    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (options) {
        
        this.videolist();
    },
    //获取分类
    videolist: function () {
        var that = this;
        util.httpRrquest(app.data.rooturl + 'system/getVideo', 'GET', {  })
            .then(function (response) {
                console.log(response.data.data)
                that.setData({
                    list: response.data.data
                })
            }, function (error) {
                console.log(error);
            });
    },
    onReady() {
        this.videoContext = wx.createVideoContext('myVideo')
    },
    onHide() {

    },
    data: {
        list: []
    },
    /**
    * 用户点击右上角分享
    */
    onShareAppMessage: function () {
        var shareinfo = app.setShareMessage();
        console.log(shareinfo);
        return {
            title: shareinfo.title,
            path: shareinfo.path,
            imageUrl: shareinfo.imageUrl,
            success: (res) => {
                wx.showToast({
                    title: "分享成功",
                    icon: 'loading'
                })
            }
        }
    },
})